﻿namespace Jim.OA;

/// <summary>
/// 修改消息
/// </summary>
[Sdk("/api/ec/dev/message/alterCustomMessageSingle",description: "修改消息")]
public class OAAlterMessageInput : ISdkRequest<OAAlterMessageOutput>,ISdkCustomDic
{
    /// <summary>
    /// 消息来源code+"|"+业务id 需要修改消息状态时传入
    /// </summary>
    public string TargetId { get; set; }

    /// <summary>
    /// 消息来源（见文档第四点补充）
    /// </summary>
    public string Code { get; set; }
    /// <summary>
    /// 接收人OA系统id
    /// </summary>
    public string UserIdList { get; set; }
    /// <summary>
    /// 接收人登录名
    /// </summary>
    public string LoginIdList { get; set; }
    /// <summary>
    /// 接收人编号
    /// </summary>
    public string WorkCodeList { get; set; }
    /// <summary>
    /// 接收人接收人姓名
    /// </summary>
    public string LastNameList { get; set; }
    /// <summary>
    /// 0 表示消息初始状态是待处理 需要修改消息状态时传入
    /// </summary>
    /// <returns></returns>
    public string BizState { get; set; }

    public SdkDictionary Dic()
    {
        SdkDictionary dic = new SdkDictionary();
        if (!string.IsNullOrEmpty(Code)) dic.Add("code", Code);
        if (!string.IsNullOrEmpty(TargetId)) dic.Add("targetId", TargetId);
        if (!string.IsNullOrEmpty(BizState)) dic.Add("bizState", BizState);
        if (!string.IsNullOrEmpty(UserIdList)) dic.Add("userIdList", UserIdList);
        if (!string.IsNullOrEmpty(LoginIdList)) dic.Add("loginIdList", LoginIdList);
        if (!string.IsNullOrEmpty(WorkCodeList)) dic.Add("workCodeList", WorkCodeList);
        if (!string.IsNullOrEmpty(LastNameList)) dic.Add("lastNameList", LastNameList);
        return dic;
    }
}

public class OAAlterMessageOutput : SdkResponse { 

}